
import AbsMenu from '../absmenu.js'
import globalConst from '../../../canvas/common/globalConst.js';
var global = globalConst.GlobalConst;
class DrawMenu extends AbsMenu.AbsMenu {
  constructor(map, item) {
    super(map, item);
  }

  act2Click() {
    console.log("eidt-----+" + this.menuSubItem);
    var tool = 0;
    switch (this.menuSubItem) {
      case 'text':
        tool = global.BaseUnitText;
        tool = tool<<16;
        break;
      case 'line':
        tool = global.BaseUnitPolyline;
        tool = tool<<16;
        break;

      default:
        break;
    }
    if (tool != 0){
      this.map.setTool(tool);
    }
  }
}

export default { DrawMenu }

